package cn.edu.xhu.library_management.area.entity;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.Objects;


/**
 * @Author: MMJ
 * @Date: 2022 - 08 - 26
 * @Description: 书架类
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
@ApiModel(value = "书架类")
public class LmBookRack {
    @ApiModelProperty(value = "id")
    private Integer id;

    @ApiModelProperty(value = "书架编号")
    private String number;

    @ApiModelProperty(value = "书架所在行")
    private Integer row;

    @ApiModelProperty(value = "书架所在列")
    private Integer column;

    @ApiModelProperty(value = "书架总排数")
    private Integer rowNum;

    @ApiModelProperty(value = "区域ID")
    private Integer areaId;

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        LmBookRack rack = (LmBookRack) o;
        return Objects.equals(id, rack.id) && Objects.equals(number, rack.number) && Objects.equals(row, rack.row) && Objects.equals(column, rack.column) && Objects.equals(rowNum, rack.rowNum) && Objects.equals(areaId, rack.areaId);
    }

    @Override
    public int hashCode() {
        return Objects.hash(id, number, row, column, rowNum, areaId);
    }
}
